package GUIProgectMy;


public class MetodCalc 
{
	public int calc ( int n1, int n2, String op) 
	{
		int res = 0;
		switch (op) 
		{
		case "+":
			res = n1+n2;
					break;
		case "-":
			res = n1-n2;
					break;
		case "*":
			res = n1*n2;
					break;
		case "/":
			res = n1/n2;
					break;
		default:
			res = 0;
					break;
		}
		return res;
	}
}
